import {mergeConfig} from 'vite';
import baseConfig from './vite.config.base';

export default mergeConfig(
    {
        mode: 'development',
        server: {
            host: '0.0.0.0',
            port: 80,
            open: true,
            fs: {
                strict: true,
            },
            proxy: {
                // 选项写法
                '/dev-api': {
                    target: `http://localhost:8080`,
                    secure: false,
                    changeOrigin: true,
                    rewrite: (path: string) => path.replace(/^\/dev-api/, '')
                }
            },
            disableHostCheck: true
        },
        plugins: [],
    },
    baseConfig
);
